import java.util.Collection;
import java.util.Iterator;
import java.util.TreeSet;
public class eg8_8 {
    public static void main(String[] args) {
        TreeSet<Integer>treeSet1 =new TreeSet<>();
        treeSet1.add(97);
        treeSet1.add(123);
        treeSet1.add(22);
        treeSet1.add(4);
        treeSet1.add(69);
        treeSet1.remove(69);
        treeSet1.add(100);
        show(treeSet1);
    }
    public static void show(Collection collection){
        Iterator it=collection.iterator();
        while (it.hasNext()){
            System.out.println(it.next()+"");
            System.out.println();
        }
    }
}
